<?php
$countrycodes = array();
array_push($countrycodes, 'Afghanistan@93@' . __('Afghanistan', null, "country"));
array_push($countrycodes, 'Albania@355@' . __('Albania', null, "country"));
array_push($countrycodes, 'Algeria@213@' . __('Algeria', null, "country"));
array_push($countrycodes, 'American Samoa@684@' . __('American Samoa', null, "country"));
array_push($countrycodes, 'Andorra@376@' . __('Andorra', null, "country"));
array_push($countrycodes, 'Argentina@54@' . __('Argentina', null, "country"));
array_push($countrycodes, 'Armenia@374@' . __('Armenia', null, "country"));
array_push($countrycodes, 'Aruba@297@' . __('Aruba', null, "country"));
array_push($countrycodes, 'Ascension Land@247@' . __('Ascension Land', null, "country"));
array_push($countrycodes, 'Australia@61@' . __('Australia', null, "country"));
array_push($countrycodes, 'Austria@43@' . __('Austria', null, "country"));
array_push($countrycodes, 'Azerbaijan@994@' . __('Azerbaijan', null, "country"));
array_push($countrycodes, 'Bahrain@973@' . __('Bahrain', null, "country"));
array_push($countrycodes, 'Belgium@32@' . __('Belgium', null, "country"));
array_push($countrycodes, 'Belize@501@' . __('Belize', null, "country"));
array_push($countrycodes, 'Benin@229@' . __('Benin', null, "country"));
array_push($countrycodes, 'Bhutan@975@' . __('Bhutan', null, "country"));
array_push($countrycodes, 'Bolivia@591@' . __('Bolivia', null, "country"));
array_push($countrycodes, 'Bosnia@387@' . __('Bosnia', null, "country"));
array_push($countrycodes, 'Botswana@267@' . __('Botswana', null, "country"));
array_push($countrycodes, 'Brazil@55@' . __('Brazil', null, "country"));
array_push($countrycodes, 'Brunei@673@' . __('Brunei', null, "country"));
array_push($countrycodes, 'Bulgaria@359@' . __('Bulgaria', null, "country"));
array_push($countrycodes, 'Burkina Faso@226@' . __('Burkina Faso', null, "country"));
array_push($countrycodes, 'Burundi@257@' . __('Burundi', null, "country"));
array_push($countrycodes, 'Cambodia@855@' . __('Cambodia', null, "country"));
array_push($countrycodes, 'Cameron@237@' . __('Cameron', null, "country"));
array_push($countrycodes, 'Canada@1@' . __('Canada', null, "country"));
array_push($countrycodes, 'Chad@235@' . __('Chad', null, "country"));
array_push($countrycodes, 'Chile@56@' . __('Chile', null, "country"));
array_push($countrycodes, 'China (PRC)@86@' . __('China (PRC)', null, "country"));
array_push($countrycodes, 'Colombia@57@' . __('Colombia', null, "country"));
array_push($countrycodes, 'Costa Rica@506@' . __('Costa Rica', null, "country"));
array_push($countrycodes, 'Croatia@385@' . __('Croatia', null, "country"));
array_push($countrycodes, 'Cuba@53@' . __('Cuba', null, "country"));
array_push($countrycodes, 'Cyprus@357@' . __('Cyprus', null, "country"));
array_push($countrycodes, 'Czech Republic@420@' . __('Czech Republic', null, "country"));
array_push($countrycodes, 'Denmark@45@' . __('Denmark', null, "country"));
array_push($countrycodes, 'Deigo Garicia@246@' . __('Deigo Garicia', null, "country"));
array_push($countrycodes, 'Djibouti@253@' . __('Djibouti', null, "country"));
array_push($countrycodes, 'Ecuador@593@' . __('Ecuador', null, "country"));
array_push($countrycodes, 'Egypt@20@' . __('Egypt', null, "country"));
array_push($countrycodes, 'El Salvador@503@' . __('El Salvador', null, "country"));
array_push($countrycodes, 'Equatorial Guinea@24@' . __('Equatorial Guinea', null, "country"));
array_push($countrycodes, 'Eritrea@291@' . __('Eritrea', null, "country"));
array_push($countrycodes, 'Estonia@372@' . __('Estonia', null, "country"));
array_push($countrycodes, 'Ethiopia@251@' . __('Ethiopia', null, "country"));
array_push($countrycodes, 'Faeroe Islands@298@' . __('Faeroe Islands', null, "country"));
array_push($countrycodes, 'Falkland Islands@500@' . __('Falkland Islands', null, "country"));
array_push($countrycodes, 'Fiji Islands@679@' . __('Fiji Islands', null, "country"));
array_push($countrycodes, 'Finland@358@' . __('Finland', null, "country"));
array_push($countrycodes, 'France@33@' . __('France', null, "country"));
array_push($countrycodes, 'French Antilles@596@' . __('French Antilles', null, "country"));
array_push($countrycodes, 'French Guiana@594@' . __('French Guiana', null, "country"));
array_push($countrycodes, 'French Polynesia@689@' . __('French Polynesia', null, "country"));
array_push($countrycodes, 'Gabon@241@' . __('Gabon', null, "country"));
array_push($countrycodes, 'Gambia@220@' . __('Gambia', null, "country"));
array_push($countrycodes, 'Georgia@995@' . __('Georgia', null, "country"));
array_push($countrycodes, 'Germany@49@' . __('Germany', null, "country"));
array_push($countrycodes, 'Ghana@233@' . __('Ghana', null, "country"));
array_push($countrycodes, 'Gibraltar@350@' . __('Gibraltar', null, "country"));
array_push($countrycodes, 'Greece@30@' . __('Greece', null, "country"));
array_push($countrycodes, 'Greenland@299@' . __('Greenland', null, "country"));
array_push($countrycodes, 'Guinea-Bissau@245@' . __('Guinea-Bissau', null, "country"));
array_push($countrycodes, 'Guinea (PRP)@224@' . __('Guinea (PRP)', null, "country"));
array_push($countrycodes, 'HongKong@852@' . __('HongKong', null, "country"));
array_push($countrycodes, 'Hungary@36@' . __('Hungary', null, "country"));
array_push($countrycodes, 'Iceland@353@' . __('Iceland', null, "country"));
array_push($countrycodes, 'Indonesia@62@' . __('Indonesia', null, "country"));
array_push($countrycodes, 'Islands@682@' . __('Islands', null, "country"));
array_push($countrycodes, 'Israel@972@' . __('Israel', null, "country"));
array_push($countrycodes, 'Italy@39@' . __('Italy', null, "country"));
array_push($countrycodes, 'Jamaica@1876@' . __('Jamaica', null, "country"));
array_push($countrycodes, 'Japan@81@' . __('Japan', null, "country"));
array_push($countrycodes, 'Jordan@962@' . __('Jordan', null, "country"));
array_push($countrycodes, 'Kazakhsthan@7@' . __('Kazakhsthan', null, "country"));
array_push($countrycodes, 'Kenya@254@' . __('Kenya', null, "country"));
array_push($countrycodes, 'Kiribati@686@' . __('Kiribati', null, "country"));
array_push($countrycodes, 'Korea North@850@' . __('Korea North', null, "country"));
array_push($countrycodes, 'Korea South@82@' . __('Korea South', null, "country"));
array_push($countrycodes, 'Kuwait@965@' . __('Kuwait', null, "country"));
array_push($countrycodes, 'Laos@856@' . __('Laos', null, "country"));
array_push($countrycodes, 'Latvia@371@' . __('Latvia', null, "country"));
array_push($countrycodes, 'Lebanon@961@' . __('Lebanon', null, "country"));
array_push($countrycodes, 'Lesotho@266@' . __('Lesotho', null, "country"));
array_push($countrycodes, 'Liberia@231@' . __('Liberia', null, "country"));
array_push($countrycodes, 'Libya@218@' . __('Libya', null, "country"));
array_push($countrycodes, 'Liechtenstein@423@' . __('Liechtenstein', null, "country"));
array_push($countrycodes, 'Lithuania@370@' . __('Lithuania', null, "country"));
array_push($countrycodes, 'Luxembourg@352@' . __('Luxembourg', null, "country"));
array_push($countrycodes, 'Macau@853@' . __('Macau', null, "country"));
array_push($countrycodes, 'Macedonia@389@' . __('Macedonia', null, "country"));
array_push($countrycodes, 'Madagascar@261@' . __('Madagascar', null, "country"));
array_push($countrycodes, 'Malawi@265@' . __('Malawi', null, "country"));
array_push($countrycodes, 'Malaysia@60@' . __('Malaysia', null, "country"));
array_push($countrycodes, 'Maldives@960@' . __('Maldives', null, "country"));
array_push($countrycodes, 'Mali Republic@223@' . __('Mali Republic', null, "country"));
array_push($countrycodes, 'Malta@356@' . __('Malta', null, "country"));
array_push($countrycodes, 'Martinique@596@' . __('Martinique', null, "country"));
array_push($countrycodes, 'Maurutania@222@' . __('Maurutania', null, "country"));
array_push($countrycodes, 'Mauritius@230@' . __('Mauritius', null, "country"));
array_push($countrycodes, 'Mexico@52@' . __('Mexico', null, "country"));
array_push($countrycodes, 'Mongolia@976@' . __('Mongolia', null, "country"));
array_push($countrycodes, 'Morocco@212@' . __('Morocco', null, "country"));
array_push($countrycodes, 'Mozambique@258@' . __('Mozambique', null, "country"));
array_push($countrycodes, 'Myanmar@95@' . __('Myanmar', null, "country"));
array_push($countrycodes, 'Namibia@264@' . __('Namibia', null, "country"));
array_push($countrycodes, 'Nauru@674@' . __('Nauru', null, "country"));
array_push($countrycodes, 'Nepal@977@' . __('Nepal', null, "country"));
array_push($countrycodes, 'Netherlands@31@' . __('Netherlands', null, "country"));
array_push($countrycodes, 'New Zealand@64@' . __('New Zealand', null, "country"));
array_push($countrycodes, 'Nicaragua@505@' . __('Nicaragua', null, "country"));
array_push($countrycodes, 'Niger@227@' . __('Niger', null, "country"));
array_push($countrycodes, 'Nigeria@234@' . __('Nigeria', null, "country"));
array_push($countrycodes, 'Niue@683@' . __('Niue', null, "country"));
array_push($countrycodes, 'Norfolk Island@672@' . __('Norfolk Island', null, "country"));
array_push($countrycodes, 'Norway@47@' . __('Norway', null, "country"));
array_push($countrycodes, 'Oman@968@' . __('Oman', null, "country"));
array_push($countrycodes, 'Pakistan@92@' . __('Pakistan', null, "country"));
array_push($countrycodes, 'Palau@680@' . __('Palau', null, "country"));
array_push($countrycodes, 'Palestine@970@' . __('Palestine', null, "country"));
array_push($countrycodes, 'Panama@507@' . __('Panama', null, "country"));
array_push($countrycodes, 'Paraguay@595@' . __('Paraguay', null, "country"));
array_push($countrycodes, 'Peru@51@' . __('Peru', null, "country"));
array_push($countrycodes, 'Philippines@63@' . __('Philippines', null, "country"));
array_push($countrycodes, 'Poland@48@' . __('Poland', null, "country"));
array_push($countrycodes, 'Portugal@351@' . __('Portugal', null, "country"));
array_push($countrycodes, 'Qatar@974@' . __('Qatar', null, "country"));
array_push($countrycodes, 'Reunion Island@262@' . __('Reunion Island', null, "country"));
array_push($countrycodes, 'Romania@40@' . __('Romania', null, "country"));
array_push($countrycodes, 'Russia@7@' . __('Russia', null, "country"));
array_push($countrycodes, 'Rwanda@250@' . __('Rwanda', null, "country"));
array_push($countrycodes, 'San Marino@378@' . __('San Marino', null, "country"));
array_push($countrycodes, 'Saudi Arabia@9666@' . __('Saudi Arabia', null, "country"));
array_push($countrycodes, 'Senegal@221@' . __('Senegal', null, "country"));
array_push($countrycodes, 'Serbia@381@' . __('Serbia', null, "country"));
array_push($countrycodes, 'Seychelles Islands@248@' . __('Seychelles Islands', null, "country"));
array_push($countrycodes, 'Sierra Leone@232@' . __('Sierra Leone', null, "country"));
array_push($countrycodes, 'Singapore@65@' . __('Singapore', null, "country"));
array_push($countrycodes, 'Slovak Republic@421@' . __('Slovak Republic', null, "country"));
array_push($countrycodes, 'Slovenia@386@' . __('Slovenia', null, "country"));
array_push($countrycodes, 'Solomon Islands@677@' . __('Solomon Islands', null, "country"));
array_push($countrycodes, 'South Africa@27@' . __('South Africa', null, "country"));
array_push($countrycodes, 'Spain@34@' . __('Spain', null, "country"));
array_push($countrycodes, 'Sri Lanka@94@' . __('Sri Lanka', null, "country"));
array_push($countrycodes, 'Sudan@249@' . __('Sudan', null, "country"));
array_push($countrycodes, 'Suriname@597@' . __('Suriname', null, "country"));
array_push($countrycodes, 'Swaziland@268@' . __('Swaziland', null, "country"));
array_push($countrycodes, 'Sweden@46@' . __('Sweden', null, "country"));
array_push($countrycodes, 'Switzerland@41@' . __('Switzerland', null, "country"));
array_push($countrycodes, 'Syria@963@' . __('Syria', null, "country"));
array_push($countrycodes, 'Taiwan@886@' . __('Taiwan', null, "country"));
array_push($countrycodes, 'Tajikistan@992@' . __('Tajikistan', null, "country"));
array_push($countrycodes, 'Tanzania@255@' . __('Tanzania', null, "country"));
array_push($countrycodes, 'Thailand@66@' . __('Thailand', null, "country"));
array_push($countrycodes, 'Toto@228@' . __('Toto', null, "country"));
array_push($countrycodes, 'Tonga Islands@676@' . __('Tonga Islands', null, "country"));
array_push($countrycodes, 'Tunisia@216@' . __('Tunisia', null, "country"));
array_push($countrycodes, 'Turkey@90@' . __('Turkey', null, "country"));
array_push($countrycodes, 'Turkmenistan@993@' . __('Turkmenistan', null, "country"));
array_push($countrycodes, 'Tuvalu@688@' . __('Tuvalu', null, "country"));
array_push($countrycodes, 'Uganda@256@' . __('Uganda', null, "country"));
array_push($countrycodes, 'Ukraine@380@' . __('Ukraine', null, "country"));
array_push($countrycodes, 'UAE@971@' . __('UAE', null, "country"));
array_push($countrycodes, 'United Kingdom@44@' . __('United Kingdom', null, "country"));
array_push($countrycodes, 'USA@1@' . __('USA', null, "country"));
array_push($countrycodes, 'Uruguay@598@' . __('Uruguay', null, "country"));
array_push($countrycodes, 'Uzbekistan@998@' . __('Uzbekistan', null, "country"));
array_push($countrycodes, 'Vanuatu@678@' . __('Vanuatu', null, "country"));
array_push($countrycodes, 'Vatican City@39@' . __('Vatican City', null, "country"));
array_push($countrycodes, 'Venezuela@58@' . __('Venezuela', null, "country"));
array_push($countrycodes, 'Vietnam@84@' . __('Vietnam', null, "country"));
array_push($countrycodes, 'Western Samoa@685@' . __('Western Samoa', null, "country"));
array_push($countrycodes, 'Yemen@967@' . __('Yemen', null, "country"));
array_push($countrycodes, 'Yugoslavia@381@' . __('Yugoslavia', null, "country"));
array_push($countrycodes, 'Zambia@260@' . __('Zambia', null, "country"));
array_push($countrycodes, 'Zanzibar@255@' . __('Zanzibar', null, "country"));
array_push($countrycodes, 'Zimbabwe@263@' . __('Zimbabwe', null, "country"));

echo "<select name='" . $countryName . "' id='" . $countryId . "'>";
foreach ($countrycodes as $countrycode) {
    $position = explode('@', $countrycode);
    $name = $position[2];
    $code = $position[0];

    $selected = "";
    if ($code == $countrySelected)
        $selected = "selected";

    echo "<option value='".$code ."' ".$selected.">" . $name . "</option>";
}
echo "</select>";
?>